<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
    <form action="/addEmp" method="post">
         <input type="text" name="empno" />
         <input type="text" name="name" />
         <input type="submit" value="添加">
    </form>
    <hr>
    <a href="/delEmp?empno=8888&empno=7777&empno=6666">批量删除雇员</a>
    <hr>
    <form action="/updateEmp" method="post">
      <p>
        <lable>雇员编号</lable><input type="text" name="empno" />
      </p>
      <p>
        <lable>姓名</lable><input type="text" name="name" />
      </p>
      <p>
        <lable>雇员姓名</lable><input type="text" name="ename" />
      </p>
      <p>
        <lable>雇员工作</lable><input type="text" name="job" />
      </p>
      <p>
        <lable>上级领导编号</lable><input type="text" name="mgr" />
      </p>
      <p>
        <lable>雇佣日期</lable><input type="date" name="hiredate" />
      </p>
      <p>
        <lable>雇员工资</lable><input type="text" name="sal" />
      </p>
      <p>
        <lable>雇员奖金</lable><input type="text" name="comm" />
      </p>
      <p>
        <lable>部门编号</lable><input type="text" name="deptno" />
      </p>
      <p>
        <input type="submit" value="修改">
      </p>
    </form>
    <hr>
    <!--<a href="/queryEmp?empno=7369&ename=smith&deptno=20&deptList[0].dname=chongqing">查询</a>-->
    <form action="/queryEmp" method="get">
      <p>
        <lable>雇员编号</lable><input type="text" name="empno" />
      </p>
      <p>
        <lable>雇员姓名</lable><input type="text" name="ename" />
      </p>
      <p>
        <lable>集合</lable><input type="text" name="deptList[0].dname" />
        <lable>集合</lable><input type="text" name="deptList[1].dname" />
      </p>
      <p>
        <input type="submit" value="修改">
      </p>
    </form>
    <hr>
    <!--采用resutful方式传递参数：/接口/参数//-->
    <a href="/queryEmpByRestful/7369/smith/20">查询</a>
    <hr>
    <button id="btn_query">点击查询</button>
    <!--引入jQuery依赖-->
    <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript">
        $(function () {
            //给按钮绑定点击事件
            $("#btn_query").click(function () {
                 $.ajax({
                     url:"/findEmpList",
                     type:"get",
                     data:{empno:8888},
                     dataType:"json",
                     success:function (res) {
                          console.log(res)
                     }
                 })
            });
        })
    </script>
</body>
</html>